package com.gouying.web.feign;

import com.gouying.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author ly
 */
@FeignClient("gy-product")
public interface ProductFeignService {

    /**
     * 根据AttrId查询其详细信息
     *
     * @param attrId 分类id
     * @return
     */
    @GetMapping("/product/attr/info/{attrId}")
    R attrInfo(@PathVariable("attrId") Long attrId);

    /**
     * 根据brandIds查询所有品牌的详细信息
     *
     * @param brandIds 品牌id集合
     * @return
     */
    @GetMapping("/product/brand/infos")
    R brandsInfo(@RequestParam("brandIds") List<Long> brandIds);
}
